package org.lease.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.lease.mapper.CityInfoMapper;
import org.lease.model.entity.CityInfo;
import org.lease.service.CityInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CityInfoServiceImpl extends ServiceImpl<CityInfoMapper, CityInfo> implements CityInfoService {
    @Override
    public List<CityInfo> listByProvinceId(Long provinceId) {
        LambdaQueryWrapper<CityInfo> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(CityInfo::getProvinceId, provinceId);
        return list(wrapper);
    }
}
